<%--
 *  File:   VisitFeedBackDownload.jsp
 *  Desc:	Report Director depend on eSpreadsheet
 *
 *  Date		         Author		      Changes
 *  2009-12-15	  		visazhou		  Created
 *   
 *
 *  Copyright (C) 2000 - 2008 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>

<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.*" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>
<%//init param
			String privilegeCode = "H0261";
			String strTableName = "";
			String strModuleName = "SFE";
			String contextPath = request.getContextPath();

			%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>

<iframe name="reloadHandler" style="display:none"></iframe>
<html>
<head>
<title>targetDownMonth</title>
<PageFlow:CheckPageFlow pageName="p_scourcarddetail" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/FuncLib.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/Calendar.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>


<%@ include file="/inc/SummaryDivision.inc" %>
<%Vector totalsummary = (Vector) pageContext.getAttribute("totalsummary");
			if (totalsummary == null)
				totalsummary = new Vector();

			HashMap UserInfo = (HashMap) session.getAttribute("userinfo");
			if (UserInfo == null)
				UserInfo = new HashMap();

			%>

<%--  put your custom script here   --%>

<%@ include file="/inc/ReportPrint.inc" %>
<script language="JavaScript">

function page_summary(actionvalue,orderbyname)
{
  var editform = summaryPrepare(cform,actionvalue,orderbyname);
  if(!editform) return;
  	editform.action = "VisitFeedBackDownload.jsp?<%= OvalTools.randomURL() %>";
    editform.target = "_self";
    isRunning = true;
    editform.submit();
}

function download() {

	var flag = document.cform.flag.value;
	var loginid = document.cform.loginid.value;
	var url;
	if (flag == 2){
		url = "<%=ip%>/servlet/ExcecuteReport/visitfeedbackdownload.sox?__folder=/ovalreport/visitfeedbackdownload"+"&loginid="+loginid ;
	} 
	else{
		url = "<%=ip%>/servlet/ExcecuteReport/visitfeedbackdownload2.sox?__folder=/ovalreport/visitfeedbackdownload2"+"&loginid="+loginid ;
	}
	var windowAttribute = "height=400, width=600,top=100,left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
	window.open(url,"newwindow",windowAttribute);
}

</script>

</head>
<body style="overflow: auto;" >
<form name="cform" method="post" action="<%=contextPath%>/Dispatcher">
	<input type="hidden" name="pagename" value="p_scourcarddetail">
	<input type="hidden" name="actionname">
	<input type="hidden" name="prodcode">
	<input type="hidden" name="prodid">
	<custom:hidden property="languagecode" scope="session" name="userinfo"/>
	<custom:hidden property="contactid" scope="session" name="userinfo" changedName="loginid"/>
	<%--  page location   --%>
<%@ include file="/inc/PageLocation.inc"%>


<table width="100%" border="0" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
<!-------------------------------------1 row -------------------------------------------------->
	<tr>		
		<td class="title_center">
			<div align="right">
				<%= label.getLabelName("L_Group") + label.getLabelName("L_Colon") %>
			</div>
		</td>
		<td class="title_center">
			<div align="left">	
				<custom:selectdic property="flag" dictType="ProcessType" command="notnull" />
			</div>
		</td>
			
	</tr>
</table>

		 <table width="100%" cellspacing="0" cellpadding="0">
		        <tr>
		          <td class="summary_top"></td>
		        </tr>
		        <tr>
		          <td class="summary_top"></td>
		        </tr>
		        <tr>
		          <td class="summary_top"></td>
		        </tr>
		        <tr>
		          	<td class="td_center">
				  		<a onclick="javascript:download();"><input name="button" type="button" value="<%=label.getLabelName("L_ExportExcel")%>" /></a>
					</td>
		        </tr>
     	</table>
	</table>
</form>
</body>
</html>
